<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <script type="text/javascript" src="./Public/JQuery/jquery-1.4.4.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.effects.core.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.datepicker.js"></script>
        <script type="text/javascript" src="./Public/JQuery/ui/jquery.ui.button.js"></script>
        <link rel="stylesheet" type="text/css" href="./Public/JQuery/themes/base/jquery.ui.all.css">
        <link rel="stylesheet" type="text/css" href="./Public/css/grid.css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            $(document).ready(function()
            {
                //JQuery
                $(this).ready(function(){
                    var dates = $( "#from, #to" ).datepicker({
                        defaultDate: "+1w",
                        changeMonth: true,
                        dateFormat: "yy-mm-dd",
                        onSelect: function( selectedDate ) {
                            var option = this.id == "from" ? "minDate" : "maxDate",
                            instance = $( this ).data( "datepicker" ),
                            date = $.datepicker.parseDate(
                            instance.settings.dateFormat ||
                                $.datepicker._defaults.dateFormat,
                            selectedDate, instance.settings );
                            dates.not( this ).datepicker( "option", option, date );
                        }});
                    $("#dispname").hide();
                    $("select").change(function()
                    {
                        txt = $("select option:selected").attr('value');
                        if(txt.match('choose') == 'choose')
                        {
                            $('#dispname').show();
                        }
                        else
                        {
                            $('#dispname').hide();
                        }
                    });
                    $("input:button").button();
                    $("input:button").click(function(){
                        $("input:button").click(function(){
                            forpost = $("#datepick").serialize();
                            $.post("/TDX/index.php?s=/Core/getRecord", forpost, function(data){
                                tmp = '<p class="smalltitle">查询结果</p><table width="460" border="0" id="tbl"></table>';
                                $('#result').html(tmp);
                                tmp = '<tr><th width="50" scope="col">UID</th><th width="80" scope="col">用户名</th><th width="50" scope="col">真实姓名</th><th width="160" scope="col">操作时间</th><th width="50" scope="col">金额</th><th width="70" scope="col">操作类型</th></tr>';
                                tabletitle = '';
                                $('#tbl').html(tmp+data);
                            });
                        });
                    });
                });
            });
        </script>
        <style type="text/css">

        </style>
        <title>{$title}</title>
    </head>
    <body>
        <form id="datepick" style="font-size:14px">
            <label for="from">From</label>
            <input type="text" id="from" name="from"/>
            <label for="to">to</label>
            <input type="text" id="to" name="to"/>
            <br/>
            <label for="user">选择用户</label>
            <select name="user" id="seluser">
                <option value="all">所有用户</option>
                <option value="self">我自己</option>
                <option value="choose_uid">按照UID显示记录</option>
                <option value="choose_name">按照用户名显示记录</option>
                <option value="choose_tname">按照真实姓名显示记录</option>
            </select><span id="dispname" style="margin-left:1em"><input type="text" id="key" name="key"/></span>
            <input type="button" value="查询" style="margin-left:1em"/>
        </form>
        <div class="titlecolumn grid_6" id="result"></div>;
    </body>
</html>